package com.vichat.gps.entity;

import java.sql.Time;
import java.sql.Timestamp;

import javax.persistence.*;

/***************
 * author: autogen version: 2018-03-22 17:41:33.768
 */
@Entity
@Embeddable
@Table(name = "alarm_log", catalog = "userdb")
public class AlarmLog implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	public static final String TABLE = "alarm_log";

	/** 告警编号 */
	public static final String ALARM_ID = "alarm_id";	
	/** 事件结束标识 */
	public static final String DISTINGUISH_ID = "distinguish_id";
	/** 告警时间 */
	public static final String ALARM_TIME = "alarm_time";
	/** 告警类型 */
	public static final String ALARM_TYPE = "alarm_type";
	/** 告警信息 */
	public static final String ALARM_INFO = "alarm_info";
	/** 告警等级 */
	public static final String ALARM_RANK = "alarm_rank";
	/** 告警接收人 */
	public static final String ALARM_CALL = "alarm_call";
	/** 处理状态 */
	public static final String HANDLE_STATE = "handle_state";
	/** 告警状态 */
	public static final String ALARM_STATE = "alarm_state";
	/** 最后处理时间 */
	public static final String LAST_HANDLE_TIME = "last_handle_time";
	/** 处理人 */
	public static final String LAST_HANDLE = "last_handle";
	/** 处理流程 */
	public static final String HANDLE_FLOW = "handel_flow";
	/** 告警流程 */
	public static final String ALARM_FLOW = "alarm_flow";
	/** 事件结束标识 */
	public static final String END_STATE = "end_state";

	@Id
	@Column(name = "alarm_id", unique = true, nullable = false)
	public int alarmId;

	@Column(name = "distinguish_id", nullable = false)
	public String distinguishId;
	
	@Column(name = "alarm_time", nullable = false)
	public Timestamp alarmTime;

	@Column(name = "alarm_type", nullable = false)
	public int alarmType;

	@Column(name = "alarm_info", nullable = false)
	public String alarmInfo;

	@Column(name = "alarm_rank")
	public int alarmRank;

	@Column(name = "alarm_call", nullable = false)
	public String alarmCall;

	@Column(name = "handle_state", nullable = false)
	public int handleState;

	@Column(name = "alarm_state", nullable = false)
	public int alarmState;

	@Column(name = "last_handle_time")
	public Timestamp lastHandleTime;

	@Column(name = "last_handle")
	public String lastHandle;

	@Column(name = "handel_flow")
	public String handelFlow;

	@Column(name = "alarm_flow")
	public String alarmFlow;
	
	@Column(name = "end_state", nullable = false)
	public int endState;

	public Timestamp getLastHandleTime() {
		return lastHandleTime;
	}

	public void setLastHandleTime(Timestamp lastHandleTime) {
		this.lastHandleTime = lastHandleTime;
	}
	
	public String getDistinguishId() {
		return distinguishId;
	}

	public void setDistinguish_id(String distinguishId) {
		this.distinguishId = distinguishId;
	}

	public int getEndState() {
		return endState;
	}

	public void setEndState(int endState) {
		this.endState = endState;
	}

	public int getAlarmId() {
		return alarmId;
	}

	public void setAlarmId(int alarmId) {
		this.alarmId = alarmId;
	}

	public Timestamp getAlarmTime() {
		return alarmTime;
	}

	public void setAlarmTime(Timestamp alarmTime) {
		this.alarmTime = alarmTime;
	}

	public int getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(int alarmType) {
		this.alarmType = alarmType;
	}

	public String getAlarmInfo() {
		return alarmInfo;
	}

	public void setAlarmInfo(String alarmInfo) {
		this.alarmInfo = alarmInfo;
	}

	public int getAlarmRank() {
		return alarmRank;
	}

	public void setAlarmRank(int alarmRank) {
		this.alarmRank = alarmRank;
	}

	public String getAlarmCall() {
		return alarmCall;
	}

	public void setAlarmCall(String alarmCall) {
		this.alarmCall = alarmCall;
	}

	public int getHandleState() {
		return handleState;
	}

	public void setHandleState(int handleState) {
		this.handleState = handleState;
	}

	public int getAlarmState() {
		return alarmState;
	}

	public void setAlarmState(int alarmState) {
		this.alarmState = alarmState;
	}

	public String getLastHandle() {
		return lastHandle;
	}

	public void setLastHandle(String lastHandle) {
		this.lastHandle = lastHandle;
	}

	public String getHandelFlow() {
		return handelFlow;
	}

	public void setHandelFlow(String handelFlow) {
		this.handelFlow = handelFlow;
	}

	public String getAlarmFlow() {
		return alarmFlow;
	}

	public void setAlarmFlow(String alarmFlow) {
		this.alarmFlow = alarmFlow;
	}

	public AlarmLog() {
	}

	public AlarmLog(boolean qryflag) {
		if (qryflag) {
			this.alarmId=0;
			this.alarmTime=null;
			this.alarmType=0;
			this.alarmInfo=null;
			this.alarmRank=0;
			this.alarmCall=null;
			this.handleState=0;
			this.alarmState=0;
			this.lastHandleTime=null;
			this.lastHandle=null;
			this.handelFlow=null;
			this.alarmFlow=null;
			this.endState=0;
			this.distinguishId=null;
		}
	}

	public AlarmLog(int alarmId,String distinguishId,Timestamp alarmTime,int alarmType,String alarmInfo,int alarmRank,String alarmCall,int handleState,int alarmState,Timestamp lastHandleTime,String lastHandle,String handelFlow,String alarmFlow,int endState) {
		super();
		this.alarmId=alarmId;
		this.distinguishId=distinguishId;
		this.alarmTime=alarmTime;
		this.alarmType=alarmType;
		this.alarmInfo=alarmInfo;
		this.alarmRank=alarmRank;
		this.alarmCall=alarmCall;
		this.handleState=handleState;
		this.alarmState=alarmState;
		this.lastHandleTime=lastHandleTime;
		this.lastHandle=lastHandle;
		this.handelFlow=handelFlow;
		this.alarmFlow=alarmFlow;
		this.endState=endState;
	}
}
